package com.matt.remoteCall;

import com.matt.commons.dto.sso.AreaDTO;
import com.matt.commons.dto.sso.StaffDTO;
import com.matt.commons.page.PagerQuery;
import com.matt.controller.po.ChildMemberPo;
import com.matt.domain.ClassReviewVo;
import com.matt.domain.CourseProductVo;
import com.matt.domain.PageResult;
import com.matt.domain.ParentUser;
import com.matt.remoteCall.DTO.*;

import java.util.List;
import java.util.Map;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2018/6/25
 * *******************************
 */
public interface SsoCallService {

    //当前用户基本信息
    StaffDTO getStaffDTO(String ticket);
    //指定用户基本信息
    StaffDTO getStaffDTO(String ticket, String staffId);

    StaffDTO getStaffDTOByPhone(String ticket, String phone);

    StaffDTO updateStaff(String ticket, StaffDTO staffDTO);

    StaffDTO quitStaff(String ticket, String staffId);

    //创建用户
    StaffDTO createStaff(String ticket, StaffDTO staffDTO);

    Map resetPassword(String ticket, String oldPassword, String newPassword);

    String passLogin(String moblie, String password, String ip, int term);

    //根据id获取用户列表
    List<StaffDTO> getStaffDTOList(String ticket, String[] ids);

    List<StaffDTO> getStaffDTOList(String ticket, String permission);

    List<StaffDTO> getStaffDTOList(String areaId);

    //权限
    Map getPermissionInfoV2(String ticket, int term);
    Map getPermissionInfoV2(String ticket);

    RoleDTO getStaffRole(String ticket);

    RoleDTO setDefaultRole(String ticket, String roleId);

    RoleDTO getDefaultRole(String ticket);

    List<RoleDTO> getStaffRoleList(String ticket);

    //根据员工id获取角色列表
    List<RoleDTO> getStaffRoleList(String ticket, String staffId);

    //重置员工角色表，需同事更新默认角色
    void setStaffRoleList(String ticket, String staffId, String[] roleIds);


    //设置角色对应的资源
    RoleDTO setRoleMenus(String ticket, String roleId, String[] menuIds, int term);

    List<RoleCountDO> getAreaRoles(String ticket, boolean staffCount);

    RoleDTO addAreaRole(String ticket, RoleDTO role);

    void removeAreaRole(String ticket, RoleDTO role);

    RoleDTO updateAreaRole(String ticket, RoleDTO role);

//    List<StaffDTO> getAreaStaffByRole(String ticket, String roleId, PagerQuery pagerQuery);

    Boolean checkStaffPermission(String ticket, String[] permission);


    //短信
    Boolean send_sms(String mobile);

    Boolean validSmsCode(String phone,String code);


    //园区
    AreaDTO getAreaDTO(String ticket);

    //园区上级集团所有园区
    List<AreaDTO>  getStaffGroupByAreaList(String ticket);

    //查询某园所未删除 未离职状态的员工ID
    List<String> getNormalStaffIdByArea(String ticket, String areaId);

    //统计信息
    List<StaffPageDO> getAreaStaffList(String ticket, String name, String roleID, PagerQuery pagerQuery);

    List<StaffPageDO> getAreaStaffListByPermission(String ticket, String permission, PagerQuery pagerQuery);

    //查询字典
    List<DictDataDTO> getDictData(String ticket, DictDataDTO dictData);

    //添加字典
    Integer addDictData(String ticket, DictDataDTO dictData);

    //删除字典
    Integer delDictData(String ticket, String dictCode);

    //修改字典
    Integer updateDictData(String ticket, DictDataDTO dictData);

    //查询单个字典
    DictDataDTO dictCodeByDictData(String ticket, String dictCode);

    //查询用户和园区名称
    Map getStaffNameAndAreaName(String staffId,String areaId);

    ParentUser getUserByMobile(String mobile);

    ChildMemberPo addChildMember(ChildMemberPo po1);

    List<CourseProductVo> selectProduct(String ticket);

    PageResult<ClassReviewVo> selectReview(String ticket, Integer pageNum, Integer pageSize, String s);
}
